package org.xxpay.pay.channel.renren;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.Assert;
import org.xxpay.common.unify.AbstractPaymentConfig;

public class RenrenConfig extends AbstractPaymentConfig {
    public static final String CHANNEL_NAME = "renren";

    public static final String RETURN_VALUE_SUCCESS = "success";
    public static final String RESPONSE_RESULT_FAIL = "fail";
    public static final String RESPONSE_RESULT_OK = "success";

    public static final String REQ_PAY_URL_FIXX = "/pay/api.php";
    public static final String REQ_PAY_QUERY_URL_FIXX = "/pay/order.php";
    RenrenConfig(String payParam){
        Assert.notNull(payParam, "init quanmin config error");
        JSONObject object = JSON.parseObject(payParam);
        setAppId(object.getString("appId"));
        setPrivateKey(object.getString("privateKey"));
        setRequestUrl(object.getString("requestUrl"));
        setPayMode(object.getString("payMode"));
    }

}
